//package springboot.file.demo.controller;
//
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import org.springframework.web.servlet.ModelAndView;
//
//import javax.servlet.http.HttpServletRequest;
//
///**
// * @Author: jxm
// * @Description:
// * @Date: 2022/10/21 11:04
// * @Version: 1.0
// */
//@RestController
//public class ShortUrlController {
//
//    //实现重定向,跳转下载页
//    @RequestMapping("/{shortUrl}")
//    public Object redirects(HttpServletRequest request, ModelAndView mav, @PathVariable("shortUrl") String shortUrl) {
//
////        String longUrl = "";
////        //根据重定向回来的短链接进行查询，查询到生成的长链接
////        ScUserShareUrl entity = shareUrlService.getUserShareUrlByShortUrl(shortUrl);
////        if (entity != null) {
////            longUrl = entity.getLongUrl();
////        }
////        mav.setViewName("redirect:" + longUrl);
//        return mav;
//    }
//}
